package mypack;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.GenericServlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;

/**
 * Servlet implementation class QuestionServlet
 */
@WebServlet("/QuestionServlet")
public class QuestionServlet extends GenericServlet {
       
    public void init(ServletConfig config) throws ServletException
    {
    	super.init(config);
    	System.out.println("initialized");
    }
    
    public void service(ServletRequest request, ServletResponse response)
    	throws ServletException, IOException
    {
    	ServletContext context = getServletContext();
    	PrintWriter out = response.getWriter();
    	out.println(context.getServerInfo());
    	out.close();
    }
}
